<div class="container">
  <h1>format_time_str()</h1>
  <p class="signature"> function format_time_str(string $stored_time_str): string </p>
  <h2>Description</h2>
  <div class="description">
    <p>Formats a time string.</p>
    <p>Accepts a time string ($stored_time_str) expected in 'HH:ii' format and formats it according to the 'h:i' or 'HH:ii' format based on the provided time.</p>
  </div>
  <h2>Parameters</h2>
  <table>
    <thead>
      <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        <th>Default</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>$stored_time_str</td>
        <td>string</td>
        <td>The time string to be formatted (expected format: 'HH:ii').</td>
        <td>N/A</td>
      </tr>
    </tbody>
  </table>
  <h2>Return Value</h2>
  <table>
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>string</td>
        <td>The formatted time string as per the 'h:i' or 'HH:ii' format or the original string if an error occurs.</td>
      </tr>
    </tbody>
  </table>
  <h2>Example Usage</h2>
  <div class="example">
    <pre>
echo format_time_str("13:45");
// Output: 01:45</pre>
  </div>
</div>
